package com.bs.product.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.bs.product.entity.Product;
import com.bs.product.entity.dto.ProductDto;
import com.bs.product.mapper.ProductMapper;
import com.bs.product.service.IProductService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lukang
 * @since 2022-11-05
 */
@Service
public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> implements IProductService {
    @Autowired
    ProductMapper mapper;
    @Override
    public Product getById(Long id) {
        return mapper.getByID(id);
    }

    @Override
    public List<Product> lbgeAll() {
        return mapper.lbgeAll();
    }

    @Override
    public List<Product> lbSearch(ProductDto dto) {
        return mapper.lbSearch(dto);
    }

    @Override
    public IPage<Product> lbSearch(IPage<Product> page, ProductDto dto) {
        return mapper.lbSearch(page,dto);
    }

    @Override
    public IPage<Product> qwpage(IPage<Product> page, LambdaQueryWrapper<Product> queryWrapper) {
        return mapper.qwpage(page,queryWrapper);
    }


}
